home *** CD-ROM | disk | FTP | other *** search
- Path: igoodwin.demon.co.uk!ian
- From: Ian Goodwin <ian@igoodwin.demon.co.uk>
- Newsgroups: comp.lang.c++
- Subject: MS Visual C++ - DRAWCLI Example - Attempting to Use DrawText
- Date: Sun, 14 Apr 1996 16:07:07 +0100
- Organization: Parallel Database Technologies Ltd
- Distribution: world
- Message-ID: <59t$zCAbSRcxEwJW@igoodwin.demon.co.uk>
- NNTP-Posting-Host: igoodwin.demon.co.uk
- X-NNTP-Posting-Host: igoodwin.demon.co.uk
- MIME-Version: 1.0
- X-Newsreader: Turnpike Version 1.12 <dXgF3jj$H5JqyL$ROhciZFzKCM>
-
- Hello World ;-)
-
-
- I am trying to knock up a quick prototype, and I was attempting to use
- the Drawcli example application. I want to display some text, only it
- doesn't show.
-
- I've tried DrawText, TextOut ExtTextOut etc.
-
- The TextColor is set to Black, and I have tried explictily loading a
- stock object, and to reset the font.
-
- I am Obviuosly missing something,.... can someone please point out my
- mistake...
-
-
- COLORREF cRef;
- COLORREF cBack;
- HFONT hFont;
-
- hFont = (HFONT) SendMessage( (HWND) AfxGetMainWnd(),
- WM_GETFONT,0,0L);
-
- pDC->Rectangle(rect);
- pDC->Ellipse(rect);
- cRef = pDC->GetTextColor();
- cBack = pDC->GetBkColor();
- hFont = (HFONT) GetStockObject(SYSTEM_FONT);
- pDC->DrawText( _T("Work, please....."), 12, rect,
- DT_LEFT );
-
-
-
- Regards Ian G.
-